﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NVSecurity.Models;

namespace NVSecurity.Controllers
{
    public class CompanyInfoController : Controller
    {
        NVSecurityEntities db = new NVSecurityEntities();
        //
        // GET: /CompanyInfo/

        public ActionResult Index()
        {
            return View();
        }
        public ActionResult GetCompanyInfoFirst()
        {
            var company = db.CompanyInfoes.FirstOrDefault();
            return PartialView(company);
        }
        public ActionResult GetCompanyInfoSecond()
        {
            var company = db.CompanyInfoes.OrderByDescending(m => m.ID).FirstOrDefault();
            return PartialView(company);
        }

    }
}
